package com.example.springboot.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author luo
 * @since 2023-07-22
 */
@Data
@TableName("message")
  public class Message implements Serializable {

  /**
   * 主键
   */
  @TableId(value = "id", type = IdType.AUTO)
  private Long id;

  /**
   * 内容
   */
  private String content;

  /**
   * 评论人
   */
  private String username;

  /**
   * 评论时间
   */
  private String time;

  /**
   * 父ID
   */
  private Long parentId;

  @TableField(exist = false)
  private Message parentMessage;

  /**
   * 关联id
   */
  private Long foreignId;
  @TableField(exist = false)
  private String avatar;

  @TableField(exist = false)
  private String nickname;
}
